#pragma once

// 9轴陀螺仪
#include "base_component.h"

class Gyroscope : public BaseComponent {
public:
    Gyroscope();
    void print() override;
    int save(YAML::Node& node) override;
    int setGyroscopeModel(std::string model);
    void setGyroscopeVendor(std::string vendor);

private:
    std::string _gyroscopeModel;
    std::string _gyroscopeVendor;
};

namespace YAML {
template <>
struct convert<Gyroscope> {
    static bool decode(const Node& node, Gyroscope& rhs) {
        rhs.setGyroscopeModel(node["gyroscopeModel"].as<std::string>());
        rhs.setGyroscopeVendor(node["gyroscopeVendor"].as<std::string>());
        return true;
    }
};
}  // namespace YAML